Skip to main content

All Questions

0votes
1answer
85views

How to run a command that requires input/output location on all folders in a directory, while correspondingly naming the new output folders?

For context, I have some experience with Unix and basic commands, but I'm seriously struggling to conceptualize more complex manipulations of files. Essentially, I have this command I want to run from ...
avery's user avatar
0votes
2answers
205views

Command-line tool enabling tagging and related tags functionality

Is there a command-line tool that enables to give a file more attributes than a name? For example, we have a file called ubuntu.pdf and we give it tags like command-line, shell, nautilus, ...
xralf's user avatar
1vote
2answers
213views

Redirect to a filename that will be a variable and contain a command substitution

I'm using nmap to scan a network and then create an XML file that contains the scanned information. I want that XML file to contain the date of the scan so that each file is unique and I can see the ...
johnmacward's user avatar
1vote
2answers
2kviews

Ext4 and Linux - very large number of files in one directory - operations

I have a problem with a very large number of files in one directory. The file system is ext4. I reached the 2**32 file limit and couldn't even write any file on this partition. The problem is very big....
Luk's user avatar
  • 13
1vote
1answer
7kviews

Perform action based on directory's existence

I'm writing a shell script in Jenkins pipeline, where if a specific zip file is available, then proceed with further step. If the zip file does not exist (it may be case that directory structure ...
Alpha's user avatar
1vote
1answer
382views

How to rename nested folders?

So I have a bunch of folders in the format of: .../course/year/... and I often reorganize them so that the format then changes to this: .../year/course/.... I've been meaning to learn how to write ...
Ace Ryder's user avatar
0votes
0answers
66views

Execute a while loop in bash constructed from variables

I am trying to write a shell script which reads a file line by line, does some operations on each line, and write output to a new file. The file name is passed as an argument. Since the file is ...
BHARATH RAJ's user avatar
0votes
2answers
386views

Renaming files by removing delimited substring

I have a lot of folders and subfolders with files with name 1. Introduction--- [ FreeCourseWeb.com ] ---.mp4 I want to rename all files recursively (folders and subfolders) to just 1. Introduction.mp4 ...
user2425924's user avatar
0votes
1answer
2kviews

Script with zip command doesn't work with wildcards

I created a bash shell script to zip all files that match a pattern as follows: #!/bin/bash zip $1 $2 When I run the above script using ./myScript.sh myzip test*, only one file that starts with the ...
Ping's user avatar
  • 101
8votes
1answer
858views

Script to add users will add users but they cannot login

I have a script that will add users from a file. It will add the users just fine as far as I can tell, but when trying to login the password supplied by the script does not work. I'm not sure if this ...
Elite's user avatar
2votes
1answer
10kviews

Shell script to Unzip files to folders in destination with same name minus the .zip, also move every none zip to same location

I definitely need to practice my scripting... So far I have the script below which works when one .zip and one flat file are put into the source location. If multiple files are put in it does not ...
Dave_Z's user avatar
1vote
3answers
2kviews

Bash looping through two sets of files

I am trying to write a bash script that can iterate through two folders, and run the files into a python program. The python program takes two input files (corresponding ones from each folder) and ...
Plasmid's user avatar
6votes
3answers
6kviews

Check if file is an archive; if yes, extract

How can I check if a file is an archive and then extract it with 7z? I understand that I could check it by file command but it won't work in scripts because of its output. I can't predict what type of ...
Michał's user avatar
3votes
1answer
8kviews

Apply command to all files in a directory

I want to apply the following command to all the files in the current directory clustalw -align -infile=*here goes the input filename* -outfile=*here goes the output filename* I also want the output ...
Manuel's user avatar
0votes
2answers
3kviews

Running a command with multiple inputs for many files

I need to run a program using 2 files as input expecting 1 output having 6000 files ranging from abc0000.faa/abc0000.fna to abc6000.faa/abc6000.fna. I also need the output file to have the same file ...
Manuel's user avatar

153050per page
close